home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-16 | 4.4 KB | 204 lines | [TEXT/MPS ] |
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: SLRefCnt.xh.
- * Generated using:
- * SOM Precompiler somipc: 2.18
- * SOM Emitter emitxh.dll: 2.33
- */
-
- /*
- *
- * File: SLRefCnt.idl
- *
- * Contains: Interface for FW_ORefCount class
- * Release Version: $ ODF 2 $
- *
- * Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- *
- */
-
-
- #ifndef SOM_FW_ORefCount_xh
- #define SOM_FW_ORefCount_xh
-
- class FW_ORefCount;
-
- #define FW_ORefCount_MajorVersion 1
- #define FW_ORefCount_MinorVersion 0
-
- /*
- * Passthru lines: File: "C.xh", "before"
- */
-
-
- /* C++ SOM defs */
- #include <somcls.xh>
- #include <somcm.xh>
-
- /* C++ parent defs */
- #ifndef SOM_SOMObject_xh
- #include <somobj.xh>
- #endif
-
- #ifndef FW_ORefCount_API
- #define FW_ORefCount_API
- /*
- * -- The Class API
- */
-
- /*
- * Start of user-defined types:
- */
- class SOMClass;
- class SOMObject;
- class FW_ORefCount;
-
- /*
- * End of user-defined types.
- */
-
- #ifdef OLDIBMSOMAPISUPPORT
- #define FW_ORefCountCClassData FW_ORefCountClassData
- #define FW_ORefCountNewClass(major,minor) somNewVersionedClassReference(FW_ORefCount,major,minor)
- #endif
-
- /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
- #define FW_ORefCountMetaClass SOMClass
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=power
- #endif
-
- /* The API to the FW_ORefCount class object, and the methods it introduces. */
- SOMEXTERN struct FW_ORefCountClassDataStructure {
- #ifdef OLDIBMSOMAPISUPPORT
- SOMClass *classObject; /* always zero, use somNewClassReference instead */
- #else
- long zero;
- #endif
- somStaticClassInfo *sci;
- somDToken instanceDataToken;
- long reserved [3];
- somMToken somInit;
- somMToken somUninit;
- somMToken Acquire;
- somMToken Release;
- somMToken GetRefCount;
- } SOMDLINK FW_ORefCountClassData;
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=reset
- #endif
-
- #if !defined(FW_ORefCount_Class_Source) && !defined(SOM_Module_slrefcnt_Source)
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import list FW_ORefCountClassData
- #endif
- #endif
-
-
- /*
- * -- Typedefs and inline method declarations for left path inherited methods
- * -- are omitted because this compilation had -museinheritedmethods in effect
- */
-
-
- /*
- * -- Typedefs for FW_ORefCount Method Procedures
- */
- SOMEXTERN {
- typedef void (* SOMLINK somTD_FW_ORefCount_Acquire)(FW_ORefCount *somSelf, Environment *ev);
- typedef long (* SOMLINK somTD_FW_ORefCount_Release)(FW_ORefCount *somSelf, Environment *ev);
- typedef long (* SOMLINK somTD_FW_ORefCount_GetRefCount)(FW_ORefCount *somSelf, Environment *ev);
- }
-
- #endif /* FW_ORefCount_API */
-
-
- /*
- * -- This emitter treats Method Tokens as Thunks by default.
- * -- Use the sc modifier "nothunks" to change this default
- */
- #undef somresolve_
- #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
-
- /*
- * -- The C++ Wrapper Class for FW_ORefCount
- */
- class FW_ORefCount : public SOMObject
- {
- public:
-
- // FW_ORefCount::new registers use of the class object, and then uses somNew
- // to allocate memory and load the object method table pointer.
- void *operator new(size_t size)
- {
- SOM_IgnoreWarning(size);
- // Allocate memory using the default allocator for FW_ORefCount, and
- // clear mem & set method table pointer, call basic initialization
- #ifdef SOMCHKNULL
- void * __somResult = (void *)
- somNewObject(FW_ORefCount);
- SOMCHKNULL(__somResult);
- return __somResult;
- #else
- return (void*) somNewObject(FW_ORefCount);
- #endif
- }
-
- // FW_ORefCount::delete uses the default deallocator for the object's class.
- void operator delete(void * obj)
- {
- if (obj) {
- SOM_Resolve(obj,SOMObject,somFree)
- ( (SOMObject*) obj );
- }
- }
-
- /* method: Acquire */
- void Acquire(Environment *ev)
- {
- SOM_ResolveD(this,FW_ORefCount,FW_ORefCount,Acquire)
- (this,ev);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: Release */
- long Release(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- long __somResult =
- SOM_ResolveD(this,FW_ORefCount,FW_ORefCount,Release)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,FW_ORefCount,FW_ORefCount,Release)
- (this,ev);
- #endif
- }
-
- /* method: GetRefCount */
- long GetRefCount(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- long __somResult =
- SOM_ResolveD(this,FW_ORefCount,FW_ORefCount,GetRefCount)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,FW_ORefCount,FW_ORefCount,GetRefCount)
- (this,ev);
- #endif
- }
-
- }; /* FW_ORefCount */
-
-
-
- #endif /* SOM_FW_ORefCount_xh */
-